import { pubRequire } from '@utils/public'
const baseUrl = '/circles'
const baseUrl2 = '/circle'
// 获取聚合内容列表
export function getSearchList(obj, callBack, errBack) {
  return pubRequire('get', `${baseUrl}/aggregation`, obj, callBack, errBack)
}
// 搜索条件-圈子
export function getCircleList(callBack, errBack) {
  return pubRequire('get', `${baseUrl}/options`, '', callBack, errBack)
}
// 搜索条件-标签
export function getTagList(circleId, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/${circleId}/labels`,
    '',
    callBack,
    errBack
  )
}
// 圈子置顶列表
export function circleTopList(obj, callBack, errBack) {
  return pubRequire('get', `${baseUrl2}/content`, obj, callBack, errBack)
}
// 圈子内容置顶
export function circleToTop(circleId, obj, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl2}/content/${circleId}/top`,
    obj,
    callBack,
    errBack
  )
}
// 圈子取消置顶
export function circleUnTop(circleId, obj, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl2}/content/${circleId}/cancel`,
    obj,
    callBack,
    errBack
  )
}
// 圈子内容移除
export function circleRemove(circleId, obj, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl2}/content/${circleId}/remove`,
    obj,
    callBack,
    errBack
  )
}
